#include "Server.h"


Server::Server(void)
{
}

Server::Server(string servername,float processingspeed, float serviceprice)
{
	this->m_ServerName = servername;
	this->m_ProcessingSpeed = processingspeed;
	this->m_ServicePrice = serviceprice;
	this->m_pCurrentUserInfo = NULL;
}

bool Server::checkBusy()
{
	if(this->m_pCurrentUserInfo == NULL) 
		return false; // May ranh vi chua co thong tin nguoi dung
	else 
		return true;  // May ban vi co thong tin nguoi dung
}


void Server::updateUserInfo(User* userinfo)
{
	this->m_pCurrentUserInfo = userinfo;
}


int Server::getProcessingSpeed()
{
	return this->m_ProcessingSpeed;
}

string Server::getServerName()
{
	return this->m_ServerName;
}
int Server::getServicePrice()
{
	return this->m_ServicePrice;
}

Server::~Server(void)
{
	delete this->m_pCurrentUserInfo; // Huy con trong luu nguoi dung;
}
